home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / C⁄C++ / Xconq 7.0d37 / lib / monster.g < prev    next >
Text File  |  1995-05-04  |  4KB  |  161 lines

  1. ;;; Reliving those old movies...
  2.  
  3. (game-module "monster"
  4.   (blurb "Type defns for Tokyo 1962")
  5. )
  6.  
  7. (set see-all true)
  8.  
  9. (unit-type monster (image-name "monster") (char "M")
  10.   (point-value 100)
  11.   (help "breathes fire and stomps on buildings"))
  12. (unit-type mob (name "panic-stricken mob") (image-name "horde") (char "m")
  13.   (help "helpless civilians"))
  14. (unit-type |fire department| (image-name "fireman") (char "f")
  15.   (help "puts out fires"))
  16. (unit-type |national guard| (image-name "soldiers") (char "g")
  17.   (help "does battle with the monster"))
  18. (unit-type building (image-name "city20") (char "B")
  19.   (point-value 1)
  20.   (help "good for hiding, but crushed by monster"))
  21. (unit-type burning-building (image-name "city20-burning") (char "B")
  22.   (point-value 1)
  23.   (help ""))
  24. (unit-type wrecked-building (image-name "city20-wrecked") (char "W")
  25.   (point-value 0)
  26.   (help ""))
  27. (unit-type rubble-pile (image-name "city20-rubble") (char "r")
  28.   (point-value 0)
  29.   (help ""))
  30.  
  31. (define firedept |fire department|)
  32. (define guard |national guard|)
  33. (define B building)
  34. (define BB burning-building)
  35. (define WB wrecked-building)
  36. (define R rubble-pile)
  37.  
  38. (terrain-type sea (color "sky blue") (char "."))
  39. (terrain-type beach (color "yellow") (image-name "desert") (char ","))
  40. (terrain-type street (color "light gray") (image-name "road") (char "+"))
  41. (terrain-type block (color "sienna") (char "-"))
  42. (terrain-type fields (color "green") (image-name "plains") (char "="))
  43. (terrain-type trees (color "forest green") (image-name "forest") (char "%"))
  44.  
  45. (define movers (monster mob firedept guard))
  46. (define water (sea))
  47. (define land (beach street block fields trees))
  48.  
  49. (add (monster) possible-sides "monster")
  50. (add (mob firedept guard B) possible-sides "human")
  51.  
  52. (table vanishes-on
  53.   (u* water true)
  54.   ;; Godzilla can go in the water.
  55.   (monster water false)
  56.   ;; Fire trucks and mobs can only go along the streets.
  57.   ((mob firedept) t* true)
  58.   ((mob firedept) street false)
  59.   )
  60.  
  61. (add movers acp-per-turn (2 1 2 2))
  62.  
  63. (table mp-to-enter-terrain
  64.   (u* water 99)
  65.   (monster water 0)
  66.   ((mob firedept) t* 99)
  67.   ((mob firedept) street 0)
  68.   )
  69.  
  70. (table unit-capacity-x
  71.   ((B BB) (mob firedept guard) 1)
  72.   (WB guard 1)
  73. )
  74.  
  75. (add u* hp-max (100 1 2 5 6 6 6 1))
  76.  
  77. (table hit-chance
  78.   (monster  u* ( 50  50  50  50 100 100 100   0))
  79.   (mob      u* (  0   0   0   0   0   0   0   0))
  80.   (firedept u* (  0  90  90   0   0   0   0   0))
  81.   (guard    u* ( 80   0   0   0   0   0   0   0))
  82.   (B        u* ( 10   0   0   0   0   0   0   0))
  83. )
  84.  
  85. (table damage
  86.   (u* u* 1)
  87.   (guard monster 4)
  88.   (monster B 3)
  89.   (monster BB 3)
  90.   (monster WB 3)
  91.   (u* rubble-pile 0)
  92. )
  93.  
  94. (add monster acp-to-fire 1)
  95.  
  96. (add monster range 2)
  97.  
  98. (add building wrecked-type burning-building)
  99.  
  100. (add burning-building wrecked-type wrecked-building)
  101.  
  102. (add wrecked-building wrecked-type rubble-pile)
  103.  
  104. (add BB hp-per-detonation 4)
  105.  
  106. (table detonation-unit-range
  107.   (BB u* 2)
  108.   )
  109.  
  110. (table detonation-damage-at
  111.   (BB u* 6)
  112.   )
  113.  
  114. (table detonation-damage-adjacent
  115.   (BB u* 6)
  116.   )
  117.  
  118. (table detonation-accident-chance
  119.   (BB t* 10.00)
  120.   )
  121.  
  122. ;(add u* destroy-message
  123. ;  ("kills" "extinguishes" "extinguishes" "massacres" "wipes out" "wipes out" "flattens"))
  124.  
  125. (add monster namer "monster-names")
  126.  
  127. (namer monster-names (random
  128.   "Godzilla" "Rodan" "Mothra" "Megalon" "Gajira" "Aspidra"
  129.   "Reptilicus" "Gamera"
  130.   ))
  131.  
  132. ;;; Random setup, for testing.
  133.  
  134. (add t* alt-percentile-min (  0  20  25  35  80  90 ))
  135. (add t* alt-percentile-max ( 20  25  35  80  90 100 ))
  136. (add t* wet-percentile-min 0)
  137. (add t* wet-percentile-max 100)
  138.  
  139. (set country-radius-min 5)
  140.  
  141. (add u* start-with (1 10 3 3 10 0 0 0))
  142.  
  143. (table favored-terrain
  144.   (u* sea 0)
  145.   )
  146.  
  147. (game-module (notes (
  148.   "Typically, one would set up a scenario with one or more monsters on"
  149.   "one side, and mobs, fire departments, and national guards on the"
  150.   "other.  Note"
  151.   "that the monster can easily defeat national guards one after another,"
  152.   "and that the most successful strategy for the human side is to"
  153.   "attack the monster with several units at once.  The monster can use"
  154.   "fires as a barricade to keep the national guards from getting close"
  155.   "enough to attack.  Destroying buildings is fun but not very useful."
  156.   ""
  157.   "Sandra Loosemore (sandra@cs.utah.edu) is the person to blame for this"
  158.   "piece of silliness (well, Stan aided and abetted)."
  159. )))
  160.  
  161.